package com.itheima.dao;

import com.itheima.pojo.Product;

import java.util.List;

/**
 * @author ZhangYan
 * @Date 2021/1/16
 */
public interface ProductDao {
    //查询热门商品
    List<Product> findHot() throws Exception;
    //查询最新商品
    List<Product> findNew() throws Exception;
    //根据ID查询商品信息
    Product finById(String pid) throws Exception;

    //分页查询
    //查询某cid分类下所有商品个数
    long totalCount(String cid) throws Exception;
    //查询该cid分类下所有商品信息
    List<Product> findByPage(String cid, int currentPage, int pageSize) throws Exception;
}
